import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/home/IndexHome.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      alias:'/home'
    },
    {
      path: '/category/list',
      name: 'categoryList',
      component: () => import('../views/product/IndexCategory.vue')
    },
    {
      path: '/my',
      name: 'my',
      component: () => import('../views/my/IndexMy.vue')
    },
    {
      path:'/cart',
      name:'cart',
      component:()=>import('../views/cart/IndexCart.vue')
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/home/Login.vue')
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('../views/home/Regist.vue')
    },
    {
			path: '/detail/:id',
			name: 'detail',
			component: () => import('@/views/detail/index.vue')
		},
  ]
})

export default router
